package com.project.psc.bean;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.List;

/**
 * 库存商品实体
 */
@TableName("t_store")
@Data
@AllArgsConstructor
public class StoreBean {
    /**
     * 库存商品id
     */
    @TableId(value = "pk_id", type = IdType.AUTO)
    private Long id;

    /**
     * 供应商id
     */
    @TableField("fk_supplierId")
    private Long supplierId;

    /**
     * 商品编号
     */
    @TableField("s_goodsId")
    private String goodsId;
    /**
     * 商品名
     */
    @TableField("s_goodsName")
    private String goodsName;
    /**
     * 商品品牌
     */
    @TableField("s_brand")
    private String brand;

    /**
     * 商品类型
     */
    @TableField("s_type")
    private String type;

    /**
     * 商品数量
     */
    @TableField("s_num")
    private Integer num;

    /**
     * 库存商品详情集合
     */
    @TableField(exist = false)
    private List<GoodsInfoBean> goodsInfoList;

    public StoreBean() {
    }

    public StoreBean(Long supplierId, String goodsId, String goodsName, String brand, String type, Integer num, List<GoodsInfoBean> goodsInfoList) {
        this.supplierId = supplierId;
        this.goodsId = goodsId;
        this.goodsName = goodsName;
        this.brand = brand;
        this.type = type;
        this.num = num;
        this.goodsInfoList = goodsInfoList;
    }
}
